/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tecbooks;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.print.DocFlavor;
import javax.swing.ImageIcon;



/**
 *
 * @author ifal
 */
public class TelaPrincipal extends javax.swing.JFrame {

    /**
     * Creates new form TelaPrincipal
     */
    public TelaPrincipal() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        dialogCadastro = new javax.swing.JDialog();
        paneDialogCadastro = new javax.swing.JPanel();
        btnDialogCadastroVoltar = new javax.swing.JButton();
        btnDialogCadastroLivro = new javax.swing.JButton();
        btnDialogCadastroFuncioanario = new javax.swing.JButton();
        btnDialogCadastroCliente = new javax.swing.JButton();
        dialogBusca = new javax.swing.JDialog();
        paneDialogBusca = new javax.swing.JPanel();
        btnDialogBuscaVoltar = new javax.swing.JButton();
        btnDialogBuscaLivro = new javax.swing.JButton();
        btnDialogBuscaFuncioanario = new javax.swing.JButton();
        btnDialogBuscaCliente = new javax.swing.JButton();
        btnCadastro = new javax.swing.JButton();
        btnPesquisar = new javax.swing.JButton();
        lblTecNome = new javax.swing.JLabel();
        lblImage = new javax.swing.JLabel();
        menuBar = new javax.swing.JMenuBar();
        menuArquivos = new javax.swing.JMenu();
        menuCadastro = new javax.swing.JMenu();
        itemMenuCadastroCliente = new javax.swing.JMenuItem();
        itemMenuCadastroFuncionario = new javax.swing.JMenuItem();
        cadastroAcervo = new javax.swing.JMenuItem();
        Sair = new javax.swing.JMenuItem();
        menuLocacao = new javax.swing.JMenu();
        itemMenuLocaçao = new javax.swing.JMenuItem();
        itemMenuRenovacao = new javax.swing.JMenuItem();
        menuBusca = new javax.swing.JMenu();
        itemMenuBuscaCliente = new javax.swing.JMenuItem();
        itemMenuBuscaFuncionario = new javax.swing.JMenuItem();
        itemMenuBuscaLivro = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        itemMenuDevolucao = new javax.swing.JMenuItem();

        dialogCadastro.setTitle("Tipos de Cadastros");
        dialogCadastro.setMinimumSize(new java.awt.Dimension(400, 150));
        dialogCadastro.setResizable(false);

        paneDialogCadastro.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Escolha o tipo de Cadastro", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tunga", 1, 18), new java.awt.Color(0, 51, 153))); // NOI18N

        btnDialogCadastroVoltar.setText("Sair");
        btnDialogCadastroVoltar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDialogCadastroVoltarActionPerformed(evt);
            }
        });

        btnDialogCadastroLivro.setText("Livro");
        btnDialogCadastroLivro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDialogCadastroLivroActionPerformed(evt);
            }
        });

        btnDialogCadastroFuncioanario.setText("Funcionario");
        btnDialogCadastroFuncioanario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDialogCadastroFuncioanarioActionPerformed(evt);
            }
        });

        btnDialogCadastroCliente.setText("Cliente");
        btnDialogCadastroCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDialogCadastroClienteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout paneDialogCadastroLayout = new javax.swing.GroupLayout(paneDialogCadastro);
        paneDialogCadastro.setLayout(paneDialogCadastroLayout);
        paneDialogCadastroLayout.setHorizontalGroup(
            paneDialogCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(paneDialogCadastroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnDialogCadastroCliente)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnDialogCadastroFuncioanario)
                .addGap(18, 18, 18)
                .addComponent(btnDialogCadastroLivro)
                .addGap(18, 18, 18)
                .addComponent(btnDialogCadastroVoltar)
                .addContainerGap(58, Short.MAX_VALUE))
        );
        paneDialogCadastroLayout.setVerticalGroup(
            paneDialogCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(paneDialogCadastroLayout.createSequentialGroup()
                .addGroup(paneDialogCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnDialogCadastroCliente)
                    .addComponent(btnDialogCadastroFuncioanario)
                    .addComponent(btnDialogCadastroLivro)
                    .addComponent(btnDialogCadastroVoltar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout dialogCadastroLayout = new javax.swing.GroupLayout(dialogCadastro.getContentPane());
        dialogCadastro.getContentPane().setLayout(dialogCadastroLayout);
        dialogCadastroLayout.setHorizontalGroup(
            dialogCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, dialogCadastroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(paneDialogCadastro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        dialogCadastroLayout.setVerticalGroup(
            dialogCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogCadastroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(paneDialogCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(214, Short.MAX_VALUE))
        );

        dialogBusca.setTitle("Buscas");
        dialogBusca.setMinimumSize(new java.awt.Dimension(400, 150));
        dialogBusca.setResizable(false);

        paneDialogBusca.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Escolha o tipo de Busca", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tunga", 1, 18), new java.awt.Color(0, 51, 153))); // NOI18N

        btnDialogBuscaVoltar.setText("Sair");
        btnDialogBuscaVoltar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDialogBuscaVoltarActionPerformed(evt);
            }
        });

        btnDialogBuscaLivro.setText("Livro");
        btnDialogBuscaLivro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDialogBuscaLivroActionPerformed(evt);
            }
        });

        btnDialogBuscaFuncioanario.setText("Funcionario");
        btnDialogBuscaFuncioanario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDialogBuscaFuncioanarioActionPerformed(evt);
            }
        });

        btnDialogBuscaCliente.setText("Cliente");
        btnDialogBuscaCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDialogBuscaClienteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout paneDialogBuscaLayout = new javax.swing.GroupLayout(paneDialogBusca);
        paneDialogBusca.setLayout(paneDialogBuscaLayout);
        paneDialogBuscaLayout.setHorizontalGroup(
            paneDialogBuscaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(paneDialogBuscaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnDialogBuscaCliente)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnDialogBuscaFuncioanario)
                .addGap(18, 18, 18)
                .addComponent(btnDialogBuscaLivro)
                .addGap(18, 18, 18)
                .addComponent(btnDialogBuscaVoltar)
                .addContainerGap(58, Short.MAX_VALUE))
        );
        paneDialogBuscaLayout.setVerticalGroup(
            paneDialogBuscaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(paneDialogBuscaLayout.createSequentialGroup()
                .addGroup(paneDialogBuscaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnDialogBuscaCliente)
                    .addComponent(btnDialogBuscaFuncioanario)
                    .addComponent(btnDialogBuscaLivro)
                    .addComponent(btnDialogBuscaVoltar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout dialogBuscaLayout = new javax.swing.GroupLayout(dialogBusca.getContentPane());
        dialogBusca.getContentPane().setLayout(dialogBuscaLayout);
        dialogBuscaLayout.setHorizontalGroup(
            dialogBuscaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, dialogBuscaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(paneDialogBusca, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        dialogBuscaLayout.setVerticalGroup(
            dialogBuscaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogBuscaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(paneDialogBusca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(64, Short.MAX_VALUE))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("TECKBOOKS");
        setMinimumSize(new java.awt.Dimension(550, 441));
        setResizable(false);

        btnCadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tecbooks/cadastros.png"))); // NOI18N
        btnCadastro.setBorder(null);
        btnCadastro.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        btnCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCadastroActionPerformed(evt);
            }
        });

        btnPesquisar.setBackground(null);
        btnPesquisar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tecbooks/pesquisar.png"))); // NOI18N
        btnPesquisar.setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(255, 0, 51), new java.awt.Color(0, 0, 153)));
        btnPesquisar.setBorderPainted(false);
        btnPesquisar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        btnPesquisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPesquisarActionPerformed(evt);
            }
        });

        lblTecNome.setForeground(new java.awt.Color(255, 255, 153));
        lblTecNome.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tecbooks/tecnome.PNG"))); // NOI18N

        lblImage.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tecbooks/Tela principal.jpg"))); // NOI18N
        lblImage.setMaximumSize(new java.awt.Dimension(550, 420));
        lblImage.setMinimumSize(new java.awt.Dimension(550, 420));
        lblImage.setPreferredSize(new java.awt.Dimension(550, 420));

        menuArquivos.setText(" Arquivo    ");

        menuCadastro.setText("Cadastro     ");
        menuCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuCadastroActionPerformed(evt);
            }
        });

        itemMenuCadastroCliente.setText("Cliente");
        itemMenuCadastroCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuCadastroClienteActionPerformed(evt);
            }
        });
        menuCadastro.add(itemMenuCadastroCliente);

        itemMenuCadastroFuncionario.setText("Funcionário");
        itemMenuCadastroFuncionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuCadastroFuncionarioActionPerformed(evt);
            }
        });
        menuCadastro.add(itemMenuCadastroFuncionario);

        cadastroAcervo.setText("Acervo");
        cadastroAcervo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadastroAcervoActionPerformed(evt);
            }
        });
        menuCadastro.add(cadastroAcervo);

        menuArquivos.add(menuCadastro);

        Sair.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
        Sair.setText("Sair");
        Sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SairActionPerformed(evt);
            }
        });
        menuArquivos.add(Sair);

        menuBar.add(menuArquivos);

        menuLocacao.setText("Locação     ");
        menuLocacao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuLocacaoActionPerformed(evt);
            }
        });

        itemMenuLocaçao.setText("Locação");
        itemMenuLocaçao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuLocaçaoActionPerformed(evt);
            }
        });
        menuLocacao.add(itemMenuLocaçao);

        itemMenuRenovacao.setText("Renovação de Locação");
        itemMenuRenovacao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuRenovacaoActionPerformed(evt);
            }
        });
        menuLocacao.add(itemMenuRenovacao);

        menuBar.add(menuLocacao);

        menuBusca.setText("Busca    ");

        itemMenuBuscaCliente.setText("Cliente");
        itemMenuBuscaCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuBuscaClienteActionPerformed(evt);
            }
        });
        menuBusca.add(itemMenuBuscaCliente);

        itemMenuBuscaFuncionario.setText("Funcionario");
        itemMenuBuscaFuncionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuBuscaFuncionarioActionPerformed(evt);
            }
        });
        menuBusca.add(itemMenuBuscaFuncionario);

        itemMenuBuscaLivro.setText("Livro");
        itemMenuBuscaLivro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuBuscaLivroActionPerformed(evt);
            }
        });
        menuBusca.add(itemMenuBuscaLivro);

        menuBar.add(menuBusca);

        jMenu1.setText("Devolução");

        itemMenuDevolucao.setText("Devolução");
        itemMenuDevolucao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuDevolucaoActionPerformed(evt);
            }
        });
        jMenu1.add(itemMenuDevolucao);

        menuBar.add(jMenu1);

        setJMenuBar(menuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(260, 260, 260)
                .addComponent(lblTecNome, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(btnPesquisar))
            .addGroup(layout.createSequentialGroup()
                .addGap(40, 40, 40)
                .addComponent(btnCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(lblImage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(360, 360, 360)
                        .addComponent(lblTecNome, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(30, 30, 30)
                        .addComponent(btnPesquisar))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(90, 90, 90)
                        .addComponent(btnCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(10, 10, 10))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(lblImage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void itemMenuCadastroClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuCadastroClienteActionPerformed
       dispose();
       CadastroCliente cadCliente = new CadastroCliente();
       cadCliente.setVisible(true);
    }//GEN-LAST:event_itemMenuCadastroClienteActionPerformed

    private void menuLocacaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuLocacaoActionPerformed
        
    }//GEN-LAST:event_menuLocacaoActionPerformed

    private void menuCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuCadastroActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_menuCadastroActionPerformed

    private void itemMenuLocaçaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuLocaçaoActionPerformed
       dispose();
       Locacao loc = new Locacao();
       loc.setVisible(true);         // TODO add your handling code here:
    }//GEN-LAST:event_itemMenuLocaçaoActionPerformed

    private void cadastroAcervoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadastroAcervoActionPerformed
        dispose();
        CadastroAcervo tela = new CadastroAcervo();
        tela.setVisible(true);// TODO add your handling code here:
    }//GEN-LAST:event_cadastroAcervoActionPerformed

    private void SairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SairActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_SairActionPerformed

    private void itemMenuRenovacaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuRenovacaoActionPerformed
        // TODO add your handling code here:
        dispose();
        RenovacaoLocacao renoloca = new RenovacaoLocacao();
        renoloca.setVisible(true);
    }//GEN-LAST:event_itemMenuRenovacaoActionPerformed

    private void itemMenuBuscaClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuBuscaClienteActionPerformed
        // TODO add your handling code here:
        dispose();
        new BuscaCliente().setVisible(true);
    }//GEN-LAST:event_itemMenuBuscaClienteActionPerformed

    private void itemMenuBuscaFuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuBuscaFuncionarioActionPerformed
        // TODO add your handling code here:
        dispose();
        new BuscaFuncionario().setVisible(true);
    }//GEN-LAST:event_itemMenuBuscaFuncionarioActionPerformed

    private void itemMenuBuscaLivroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuBuscaLivroActionPerformed
        dispose();
        BuscaLivros busca = new BuscaLivros();
        busca.setVisible(true);
        
        // TODO add your handling code here:
    }//GEN-LAST:event_itemMenuBuscaLivroActionPerformed

    private void itemMenuDevolucaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuDevolucaoActionPerformed
        dispose();
        Devolucao tela = new Devolucao();
        tela.setVisible(true);
        // TODO add your handling code here:
    }//GEN-LAST:event_itemMenuDevolucaoActionPerformed

    private void itemMenuCadastroFuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuCadastroFuncionarioActionPerformed
        // TODO add your handling code here:
        dispose();
        new CadastroFuncionario().setVisible(true);
    }//GEN-LAST:event_itemMenuCadastroFuncionarioActionPerformed

    private void btnCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCadastroActionPerformed
        // TODO add your handling code here:
        dialogCadastro.setVisible(true);
    }//GEN-LAST:event_btnCadastroActionPerformed

    private void btnPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPesquisarActionPerformed
        // TODO add your handling code here:
        dialogBusca.setVisible(true);
    }//GEN-LAST:event_btnPesquisarActionPerformed

    private void btnDialogBuscaClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDialogBuscaClienteActionPerformed
        // TODO add your handling code here:
        dispose();
        dialogBusca.dispose();
        new BuscaCliente().setVisible(true);
    }//GEN-LAST:event_btnDialogBuscaClienteActionPerformed

    private void btnDialogBuscaFuncioanarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDialogBuscaFuncioanarioActionPerformed
        // TODO add your handling code here:
        dispose();
        dialogBusca.dispose();
        new BuscaFuncionario().setVisible(true);
    }//GEN-LAST:event_btnDialogBuscaFuncioanarioActionPerformed

    private void btnDialogBuscaLivroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDialogBuscaLivroActionPerformed
        // TODO add your handling code here:
        dispose();
        dialogBusca.dispose();
        new BuscaLivros().setVisible(true);
    }//GEN-LAST:event_btnDialogBuscaLivroActionPerformed

    private void btnDialogBuscaVoltarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDialogBuscaVoltarActionPerformed
        // TODO add your handling code here:
        dialogBusca.dispose();
    }//GEN-LAST:event_btnDialogBuscaVoltarActionPerformed

    private void btnDialogCadastroClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDialogCadastroClienteActionPerformed
        // TODO add your handling code here:
        dispose();
        dialogCadastro.dispose();
        new CadastroCliente().setVisible(true);
    }//GEN-LAST:event_btnDialogCadastroClienteActionPerformed

    private void btnDialogCadastroFuncioanarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDialogCadastroFuncioanarioActionPerformed
        // TODO add your handling code here:
        dispose();
        dialogCadastro.dispose();
        new CadastroFuncionario().setVisible(true);
    }//GEN-LAST:event_btnDialogCadastroFuncioanarioActionPerformed

    private void btnDialogCadastroLivroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDialogCadastroLivroActionPerformed
        // TODO add your handling code here:
        dispose();
        dialogCadastro.dispose();
        new CadastroAcervo().setVisible(true);
    }//GEN-LAST:event_btnDialogCadastroLivroActionPerformed

    private void btnDialogCadastroVoltarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDialogCadastroVoltarActionPerformed
        // TODO add your handling code here:
        dialogCadastro.dispose();
    }//GEN-LAST:event_btnDialogCadastroVoltarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(TelaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TelaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TelaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TelaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TelaPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem Sair;
    private javax.swing.JButton btnCadastro;
    private javax.swing.JButton btnDialogBuscaCliente;
    private javax.swing.JButton btnDialogBuscaFuncioanario;
    private javax.swing.JButton btnDialogBuscaLivro;
    private javax.swing.JButton btnDialogBuscaVoltar;
    private javax.swing.JButton btnDialogCadastroCliente;
    private javax.swing.JButton btnDialogCadastroFuncioanario;
    private javax.swing.JButton btnDialogCadastroLivro;
    private javax.swing.JButton btnDialogCadastroVoltar;
    private javax.swing.JButton btnPesquisar;
    private javax.swing.JMenuItem cadastroAcervo;
    private javax.swing.JDialog dialogBusca;
    private javax.swing.JDialog dialogCadastro;
    private javax.swing.JMenuItem itemMenuBuscaCliente;
    private javax.swing.JMenuItem itemMenuBuscaFuncionario;
    private javax.swing.JMenuItem itemMenuBuscaLivro;
    private javax.swing.JMenuItem itemMenuCadastroCliente;
    private javax.swing.JMenuItem itemMenuCadastroFuncionario;
    private javax.swing.JMenuItem itemMenuDevolucao;
    private javax.swing.JMenuItem itemMenuLocaçao;
    private javax.swing.JMenuItem itemMenuRenovacao;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JLabel lblImage;
    private javax.swing.JLabel lblTecNome;
    private javax.swing.JMenu menuArquivos;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenu menuBusca;
    private javax.swing.JMenu menuCadastro;
    private javax.swing.JMenu menuLocacao;
    private javax.swing.JPanel paneDialogBusca;
    private javax.swing.JPanel paneDialogCadastro;
    // End of variables declaration//GEN-END:variables
}
